package demo2.assignment2;

import demo2.assignment2.phone.PhoneType;
import demo2.assignment2.phone.brand.Apple;
import demo2.assignment2.phone.brand.Huawei;
import demo2.assignment2.phone.brand.PhoneBrand;
import demo2.assignment2.phone.brand.Samsung;
import demo2.assignment2.phone.color.PhoneColor;

/**
 * Brand Factory
 */
public class PhoneBrandFactory extends PhoneAbstractFactory {
    @Override
    public PhoneBrand getPhoneBrand(String brand) {
        switch (brand) {
            case PhoneType.Brand.iPhone:
                return new Apple();
            case PhoneType.Brand.samsung:
                return new Samsung();
            case PhoneType.Brand.huawei:
                return new Huawei();
        }
        return null;
    }


    @Override
    public PhoneColor getPhoneColor(String color) {
        return null;
    }
}
